/**
 * 
 */
package com.thor.palmmall.rest.chart;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.spi.chart.SMaintainCategoryData;

/**
 * @author NuoSa
 *
 * @since 1.0
 */
public class AMaintainCategoryDataConverter
    implements Converter<SMaintainCategoryData, AMaintainCategoryData> {
  public static AMaintainCategoryDataConverter getInstance() {
    if (instance == null)
      instance = new AMaintainCategoryDataConverter();
    return instance;
  }

  private static AMaintainCategoryDataConverter instance;

  private AMaintainCategoryDataConverter() {
  }

  @Override
  public AMaintainCategoryData convert(SMaintainCategoryData source) {
    if (source == null) {
      return null;
    }
    AMaintainCategoryData target = new AMaintainCategoryData();
    target.setMaitainType(source.getMaitainType());
    target.setQty(source.getQty());
    return target;
  }

}
